package com.guigu.eduservice.service;

import com.github.pagehelper.PageInfo;
import com.guigu.eduservice.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guigu.eduservice.vo.RoleVo;

import java.util.List;

/**
 * <p>
 * 角色表（用于RBAC权限控制） 服务类
 * </p>
 *
 * @author janecraft
 * @since 2025-09-27
 */
public interface RoleService extends IService<Role> {

    //分页查询
    PageInfo<Role>  getRolePage(Integer PageNo , Integer PageSize, RoleVo vo);

    //添加觉角色
     boolean addRoleWithPermissions(Role role, List<Long> permissionIds) ;

     //修改角色
    boolean updateRoleWithPermissions(Role role);

    //根据角色id连接查询角色权限表和权限表
    Role getRoleWithPermissions(Long roleId);
    //根据角色Id删除角色权限表
    void deleteRolePermissionsByRoleId(Long roleId);
}
